Skip to main content

Element Exists

AutomatR.Web.ElementExists

The "Element Exists" activity in AutomatR's Web Activities category allows you to verify if a UI element exists, even if it is not visible. This is a crucial step in web automation workflows to ensure that the desired element is present on the webpage.

Properties

NameDescription
Input
WebElementEnter a UI Element variable identified by the "Find Element" or other activity. This is an alternative to providing the element directly using the "Web Selector."
Web SelectorSelect the browse button to indicate the element on the web with the help of the selector window. Use this if you haven't provided a WebElement.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name.
Optional
TimeoutEnter the wait time in seconds (Example: 5 seconds, i.e., 5) to wait for the activity to start. Default is set to a common timeout value if not provided.
DelayEnter the wait time in seconds (Example: 5 seconds, i.e., 5) before executing the "Element Exists" activity. Useful for handling synchronization issues.
Output
ResultOutputs True or False based on whether the specified UI element exists or not. Variables of Boolean type to store the operation result.

How to use:

  1. Drag and drop the "Element Exists" activity onto the workflow.
  2. Configure either the "WebElement" (using a UI Element variable) or the "Web Selector" to identify the target element on the web.
  3. Optionally, configure the "Timeout" to specify the maximum time to wait for the activity to start (default is set to a common timeout value).
  4. Optionally, configure the "Delay" to introduce a wait time before executing the "Element Exists" activity.
  5. Execute the workflow to verify if the specified UI element exists on the webpage.

Example: Consider an example where the "Element Exists" activity is used to check whether a button with a specific selector exists on a webpage:

Element Exists:
Web Selector: (Selector indicating the button)
Timeout: 10
Delay: 2
Result: doesElementExist

In this example, the activity checks if the UI element specified by the web selector exists on the webpage within a timeout of 10 seconds. The result (True or False) is stored in the boolean variable "doesElementExist" for further handling in the workflow.